package com.guess.study.designpattern.singleton;

/**
 * Created by tianran on 2019-06-04.
 */
public class LazyThreadSafeSingleton {

    private static LazyThreadSafeSingleton singleton;

    private LazyThreadSafeSingleton() {
        System.out.println("LazyThreadSafeSingleton Constructor");
    }

    public static synchronized LazyThreadSafeSingleton getInstance() {
        if (singleton == null) {
            singleton = new LazyThreadSafeSingleton();
        }
        return singleton;
    }

}
